import request from '@/utils/request'

// 获取角色列表
export const reqGetRoleList = (page, pagesize) => request.get('/sys/role', { params: { page, pagesize }})

// 根据id删除角色
export const reqDeleteRole = id => request.delete(`/sys/role/${id}`)

// 新增角色
export const reqAddRole = data => request.post('/sys/role', data)

// 根据id获取角色详情
export const reqGetRoleDetail = id => request.get(`/sys/role/${id}`)

// 修改角色
export const reqUpdateRole = data => request.put(`/sys/role/${data.id}`, data)

// 给角色分配权限
export const reqAssignPerm = data => request.put('/sys/role/assignPrem', data)
